	package lesson14;

public class Car 
{
	String model;
	int maxSpeed;
	int currentSpeed;
	String color;
	int currentGear;
	int maxGear = 5;
	Person owner;
	
	void accelerate()
	{
		currentSpeed +=10;
		if(currentSpeed >= maxSpeed)
			currentSpeed = maxSpeed;
	}
	
	void changeGearUp()  
	{
		if(currentGear == 5)
			System.out.println("No more gears to turn up!");
		else
			currentGear++; 
	}
	
	void changeGearDown()  
	{
		if(currentGear == 1)
			System.out.println("No more gears to turn down!");
		else 
			currentGear--; 
	}
	
	void changeGear(int gear)
	{
		if(gear >0 && gear <= maxGear)
			currentGear = gear;
		else
			System.out.println("No such gear on " + model + "; Max gear = " + maxGear);
	}
}
